<?php
/**
 * <https://y.st./>
 * Copyright © 2016 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'The causes of Vivian&apos;s migraines',
	'<{body}>' => <<<END
<p>
	Her whole life, Vivian has been getting migraines, but we think that they&apos;ve gotten worse.
	She actually went to see a doctor, which she usually won&apos;t do.
	The doctor informed her that her skull plates fused together in an incorrect manner.
	As a result, they don&apos;t move in the correct direction, which may be causing the headaches.
	I&apos;m a bit confused about this though, as I thought that once skull plates fused together, they no longer moved at all.
	If her skull plates fused together incorrectly, I&apos;m not sure how they would go about trying to fix her skull.
	They&apos;re also considering the possibility of neurological damage though, which sounds pretty ominous.
	Lastly, they are trying to rule out dietary causes.
	Vivian&apos;s been asked to refrain from eating corn, gluten, milk, and soy.
	I know that if I accidentally ingest milk, I get bad headaches, though I don&apos;t think that I get migraines.
	If milk were indeed her cause, she&apos;d be free of her migraines and would be one step closer to being vegan; she&apos;s already a vegetarian.
	I&apos;m really hoping that milk is her migraine trigger, though honestly, no matter what the cause is, it would be awesome if they could find and fix it.
</p>
<p>
	I didn&apos;t get hardly anything done on the coding front.
	I was just utterly lost as to how to render tables, especially nested tables, in plain text.
	I&apos;ve come to a couple of conclusions though.
	First, perhaps table rows should activate some sort of single-line mode that prevents the converter from using new line characters.
	This would apply to nested tables too, so if one table is within another table&apos;s table cell, the inner table would be collapsed down to a single line.
	It&apos;s not pretty, but I can&apos;t come up with a single valid reason to nest tables.
	Nesting tables itself is not very pretty, and the only time that I&apos;ve ever seen it done is to build website layouts, which is a misuse of the feature.
	I&apos;m not dead set on this single-line mode though, so it&apos;s subject to change, at the very least, until I actually come up with an implementation.
	Second, and much more importantly, I came to my senses about trying to account for later data in current table cells while in the middle of converting a table.
	My converter is intended to be exceedingly simple.
	It&apos;s fine for it to monitor and record certain past events so that it can modify the rendering/interpretation of future elements.
	However, accounting for future elements in current rendering is out of the question.
	My converter should only look ahead as much as the current contents of the line buffer.
	Nothing later than the current line buffer, except perhaps the contents of the single-word buffer, should be used to alter the rendering of a given line.
	That is to say, my processing should be stateful, but it should wait for states to be set before actually being affected by them.
	I&apos;ve been over-thinking this in an effort to make most well-formed pages render well in plain text format, but that goes beyond the scope of this project.
	Many poorly-written-yet-well-formed documents exist out there, and it&apos;s not my job to somehow make them look good.
	I only need a simple converter that does a simple-yet-effective job.
</p>
<p>
	While I was outside weeding, one of the local cats was trying to get me to pay more attention to it.
	I talk to the cat, but I try to avoid touching it out of fear that it might have diseases.
	I&apos;m not too worried about the effect of cat diseases on my own body, but I don&apos;t want to bring anything dangerous in to infect our own cat.
	The cat outside wasn&apos;t satisfied by my just talking to it though, and it kept stepping up on my leg and rubbing on me.
	Strangely though, it kept gently biting me! I&apos;ve never had any cat gently bite me aside from our own cat, even past cats that we&apos;ve had.
	I&apos;ve only had them either refrain from biting or bite hard enough to inflict pain.
	Apparently, that behavior is <a href="https://en.wikipedia.org./wiki/Cat_communication#Biting">not as uncommon as I thought</a>.
</p>
<p>
	I&apos;ve been having a bit of a problem with the wrong Web browser being opened by a certain application, so I looked into <a href="apt:galternatives">Alternatives Configurator</a>, a graphical application for configuring alternative applications for use (for example, to set a default Web browser).
	Strangely, this application demanded root&apos;s password.
	Normally, root doesn&apos;t have a password on a personal Debian system, and as a result, one can&apos;t log in as root.
	Instead, command line applications can be run with the <code>sudo</code> command and graphical applications will ask for the administrator&apos;s password, not the root password.
	Alternatives Configurator wouldn&apos;t accept an empty password or the administrator&apos;s password, and had to be started from the command line with <code>sudo</code>.
	The Alternatives Configurator option in the application menu is completely useless.
	It turned out that the alternatives system wasn&apos;t to blame though.
	None of the four Web browser options were set to the Web browser that this application keeps opening.
</p>
<section id="docmod">
	<h2>Document modifications</h2>
	<p>
		On <a href="/en/weblog/2018/01-January/16.xhtml#Vivian">2018-01-16</a>, my sister, Vivian, requested that I replace all instances of her legal name in my journal with the name &quot;Vivian&quot;.
		She also asked that the name of the organisation she works for be redacted.
		This page was modified to fulfil that request.
	</p>
</section>
END
);
